This invention relates to improvements in methods of processing encoder signals, and in particular to determining position and/or velocity from encoders, and in particular rotary encoders. It is especially suited to rotary encoders which include at least one track of magnetic encoding elements.
It is known to provide an encoder which comprises at least one track of magnetic elements arranged in an alternating sequence of north and south poles, and a detector which produces an output signal having a first state when proximal to one of the north poles and a second state when proximal to one of the south poles. Thus, as the track moves past the detector, the detector will produce a modulated output signal which alternates between the first and second states.
Commonly, the north and south poles will be of the same length (with respect to the direction of movement of the encoder track). Thus, provided the length of each pole is known it is possible to determine the velocity of the encoder track relative to the detector by measuring the time taken for the output signal to switch from one state to the other and then return to the original state.
The track may be linear to provide a linear encoder or may be annular to provide a rotary encoder. By annular we mean that the magnet elements are spaced around an annular track that is concentric with an axis of rotation of the track. Such an encoder can be used to measure the angular position of a range of rotating objects, in particular the output shaft of an electric motor.
Where the magnetic elements are equi-spaced around the annular track and are of equal circumferential length, it is possible to determine the angular velocity from the timing of transitions in the output of the detector signal. In the prior art, devices of this kind have taken measurements between every transition and produced an average so as to compensate for errors. Unfortunately, the more transitions an average is taken from, the slower the rate at which the velocity measurement is updated.